package com.hdculture.apis.grapi;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.Toast;

public class YearGraph extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        double[] values=new double[] {75,50,85.885566f,85.885566f,85.885566f,85.885566f,10,75,50,85.885566f,85.885566f,85.885566f,85.885566f,10,75,50,85.885566f,85.885566f,85.885566f,85.885566f,10};
        double[] values2 = new double[]{30,10,60,30,70,20,40,90,20,30,40,80};
        double[] values = new double[] {50,10,10,40,90,80,90,100,20,0,30,40};
//        String[] verlabels = new String[] { "21", "22", "23", "24", "25", "26", "27","21", "22", "23", "24", "25", "26", "27","21", "22", "23", "24", "25", "26", "27" };
		String[] verLabels = new String[] {"2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008","2009","2010","2011","2012"};
        String[] horLabels = new String[] { "Good", "Average", "Bad"};
		GrAPI graph = new GrAPI(this, verLabels,"Years", "Indicator Values", values, "Yearly Graph", GrAPI.BAR, false){

			@Override
			void onPointTouch(int pointIndex, int graphIndex) {
				// TODO Auto-generated method stub
				Toast.makeText(YearGraph.this, "No more graphs to display!", 1000).show();
			}
			
		};
		graph.setValues2(values2);
		graph.setValues1Color(Color.BLUE);
		graph.setValues2Color(Color.CYAN);
		graph.setXyPanelColor(Color.argb(255, 0, 0, 75));	//Dark Blue
		graph.setGraphCaptionColor(Color.argb(255, 0, 0, 75));	//Dark Blue
        setContentView(graph);
    }
}